Skip to content

Remove offscreen image request downgrading feature flag (#57226)#57226

Open
sammy-SC wants to merge 1 commit into
react:mainfrom
sammy-SC:export-D108411690
Open

Remove offscreen image request downgrading feature flag (#57226)#57226
sammy-SC wants to merge 1 commit into
react:mainfrom
sammy-SC:export-D108411690

Conversation

@sammy-SC

@sammy-SC sammy-SC commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary:

This removes the experimental enableImageRequestDowngradingForNonVisibleImages feature flag and backs out the behavior it gated. When enabled, ImageShadowNode downgraded image requests to prefetch priority for images that layout determined did not intersect the viewport — threading an ImageRequestPriority through ImageRequestParams and the Apple image managers, and propagating per-node viewport frames during Yoga layout via experimental_layoutOrigin/experimental_layoutFrame on LayoutContext.

The flag defaulted to off and was never enabled in a release, and the gated behavior did not deliver the expected improvement, so the feature is removed entirely: <Image> once again always requests at immediate priority. This deletes the feature flag, the ImageRequestPriority enum and the ImageRequestParams::priority field, the priority parameter on RCTImageManager/RCTSyncImageManager/RCTImageManagerProtocol, the experimental_layout* LayoutContext fields and their Yoga propagation, the iOS request-priority debug overlay, and the associated Fantom test scaffolding. The generated feature-flag sources and the C++ API snapshots are regenerated accordingly.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D108411690

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 16, 2026
@meta-codesync

meta-codesync Bot commented Jun 16, 2026

Copy link
Copy Markdown

@sammy-SC has exported this pull request. If you are a Meta employee, you can view the originating Diff in D108411690.

Summary:
Pull Request resolved: react#57226

This removes the experimental `enableImageRequestDowngradingForNonVisibleImages` feature flag and backs out the behavior it gated. When enabled, `ImageShadowNode` downgraded image requests to prefetch priority for images that layout determined did not intersect the viewport — threading an `ImageRequestPriority` through `ImageRequestParams` and the Apple image managers, and propagating per-node viewport frames during Yoga layout via `experimental_layoutOrigin`/`experimental_layoutFrame` on `LayoutContext`.

The flag defaulted to off and was never enabled in a release, and the gated behavior did not deliver the expected improvement, so the feature is removed entirely: `<Image>` once again always requests at immediate priority. This deletes the feature flag, the `ImageRequestPriority` enum and the `ImageRequestParams::priority` field, the priority parameter on `RCTImageManager`/`RCTSyncImageManager`/`RCTImageManagerProtocol`, the `experimental_layout*` `LayoutContext` fields and their Yoga propagation, the iOS request-priority debug overlay, and the associated Fantom test scaffolding. The generated feature-flag sources and the C++ API snapshots are regenerated accordingly.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D108411690
@meta-codesync meta-codesync Bot changed the title Remove offscreen image request downgrading feature flag Remove offscreen image request downgrading feature flag (#57226) Jun 16, 2026
@sammy-SC sammy-SC force-pushed the export-D108411690 branch from c62f78e to 25a7eda Compare June 16, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant